Optimal. Leaf size=75 \[ -\frac {\tanh ^{-1}(a x)^2}{a^3}-\frac {x \tanh ^{-1}(a x)^2}{a^2}+\frac {\tanh ^{-1}(a x)^3}{3 a^3}+\frac {2 \tanh ^{-1}(a x) \log \left (\frac {2}{1-a x}\right )}{a^3}+\frac {\text {PolyLog}\left (2,1-\frac {2}{1-a x}\right )}{a^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {6127, 6021,
6131, 6055, 2449, 2352, 6095} \begin {gather*} \frac {\text {Li}_2\left (1-\frac {2}{1-a x}\right )}{a^3}+\frac {\tanh ^{-1}(a x)^3}{3 a^3}-\frac {\tanh ^{-1}(a x)^2}{a^3}+\frac {2 \log \left (\frac {2}{1-a x}\right ) \tanh ^{-1}(a x)}{a^3}-\frac {x \tanh ^{-1}(a x)^2}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2352
Rule 2449
Rule 6021
Rule 6055
Rule 6095
Rule 6127
Rule 6131
Rubi steps
\begin {align*} \int \frac {x^2 \tanh ^{-1}(a x)^2}{1-a^2 x^2} \, dx &=-\frac {\int \tanh ^{-1}(a x)^2 \, dx}{a^2}+\frac {\int \frac {\tanh ^{-1}(a x)^2}{1-a^2 x^2} \, dx}{a^2}\\ &=-\frac {x \tanh ^{-1}(a x)^2}{a^2}+\frac {\tanh ^{-1}(a x)^3}{3 a^3}+\frac {2 \int \frac {x \tanh ^{-1}(a x)}{1-a^2 x^2} \, dx}{a}\\ &=-\frac {\tanh ^{-1}(a x)^2}{a^3}-\frac {x \tanh ^{-1}(a x)^2}{a^2}+\frac {\tanh ^{-1}(a x)^3}{3 a^3}+\frac {2 \int \frac {\tanh ^{-1}(a x)}{1-a x} \, dx}{a^2}\\ &=-\frac {\tanh ^{-1}(a x)^2}{a^3}-\frac {x \tanh ^{-1}(a x)^2}{a^2}+\frac {\tanh ^{-1}(a x)^3}{3 a^3}+\frac {2 \tanh ^{-1}(a x) \log \left (\frac {2}{1-a x}\right )}{a^3}-\frac {2 \int \frac {\log \left (\frac {2}{1-a x}\right )}{1-a^2 x^2} \, dx}{a^2}\\ &=-\frac {\tanh ^{-1}(a x)^2}{a^3}-\frac {x \tanh ^{-1}(a x)^2}{a^2}+\frac {\tanh ^{-1}(a x)^3}{3 a^3}+\frac {2 \tanh ^{-1}(a x) \log \left (\frac {2}{1-a x}\right )}{a^3}+\frac {2 \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-a x}\right )}{a^3}\\ &=-\frac {\tanh ^{-1}(a x)^2}{a^3}-\frac {x \tanh ^{-1}(a x)^2}{a^2}+\frac {\tanh ^{-1}(a x)^3}{3 a^3}+\frac {2 \tanh ^{-1}(a x) \log \left (\frac {2}{1-a x}\right )}{a^3}+\frac {\text {Li}_2\left (1-\frac {2}{1-a x}\right )}{a^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 59, normalized size = 0.79 \begin {gather*} -\frac {-\frac {1}{3} \tanh ^{-1}(a x) \left (-3 a x \tanh ^{-1}(a x)+\tanh ^{-1}(a x) \left (3+\tanh ^{-1}(a x)\right )+6 \log \left (1+e^{-2 \tanh ^{-1}(a x)}\right )\right )+\text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}(a x)}\right )}{a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 41.03, size = 5330, normalized size = 71.07
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(5330\) |
default | \(\text {Expression too large to display}\) | \(5330\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 200 vs.
\(2 (70) = 140\).
time = 0.27, size = 200, normalized size = 2.67 \begin {gather*} -\frac {1}{2} \, {\left (\frac {2 \, x}{a^{2}} - \frac {\log \left (a x + 1\right )}{a^{3}} + \frac {\log \left (a x - 1\right )}{a^{3}}\right )} \operatorname {artanh}\left (a x\right )^{2} - \frac {\frac {3 \, {\left (\log \left (a x - 1\right ) - 2\right )} \log \left (a x + 1\right )^{2} - \log \left (a x + 1\right )^{3} + \log \left (a x - 1\right )^{3} - 3 \, {\left (\log \left (a x - 1\right )^{2} - 4 \, \log \left (a x - 1\right )\right )} \log \left (a x + 1\right ) + 6 \, \log \left (a x - 1\right )^{2}}{a} - \frac {24 \, {\left (\log \left (a x - 1\right ) \log \left (\frac {1}{2} \, a x + \frac {1}{2}\right ) + {\rm Li}_2\left (-\frac {1}{2} \, a x + \frac {1}{2}\right )\right )}}{a}}{24 \, a^{2}} + \frac {{\left (2 \, {\left (\log \left (a x - 1\right ) - 2\right )} \log \left (a x + 1\right ) - \log \left (a x + 1\right )^{2} - \log \left (a x - 1\right )^{2} - 4 \, \log \left (a x - 1\right )\right )} \operatorname {artanh}\left (a x\right )}{4 \, a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \frac {x^{2} \operatorname {atanh}^{2}{\left (a x \right )}}{a^{2} x^{2} - 1}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} -\int \frac {x^2\,{\mathrm {atanh}\left (a\,x\right )}^2}{a^2\,x^2-1} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________